package controller

import "fmt"

// DemoIota iota枚举
/**
Go里面有一个关键字iota，这个关键字用来声明enum的时候采用，它默认开始值是0，const中每增加一行加1

https://github.com/astaxie/build-web-application-with-golang/blob/master/zh/02.2.md
*/

const (
	x = iota
	y = iota
	z = iota
	w
)

const v = iota

const (
	h, i, j = iota, iota, iota
)

const (
	a       = iota
	b       = "B"
	c       = iota
	d, e, f = iota, iota, iota
	g       = iota
)

func DemoIota() {
	fmt.Println(a, b, c, d, e, f, g, h, i, j, v, x, y, z, w)
}
